package com.example.parallelTemplate.commons.service.impl;

import com.example.parallelTemplate.commons.dto.UserInfoDTO;
import com.example.parallelTemplate.commons.param.UserInfoParam;
import com.example.parallelTemplate.commons.req.AppInfoReq;
import com.example.parallelTemplate.commons.service.IUserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {

    public UserInfoDTO queryUserInfo(UserInfoParam userInfoParam) {
        long beginTime = System.currentTimeMillis();
        try {
            System.out.println("开始查询用户信息" + beginTime);
            Thread.sleep(200);//模拟调用耗时200ms
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("结束查询用户信息,用时" + (System.currentTimeMillis() - beginTime));
        return new UserInfoDTO("666");
    }

    @Override
    public UserInfoParam buildUserParam(AppInfoReq req) {
        return new UserInfoParam();
    }


}
